package ru.mirent;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import ru.mirent.DiagramSaver;

import java.io.File;

public class DemonstrateDiagramsAllureTest {
    @Test
    void svgAttachmentsDiagramTest() {
        String source1 = "@startuml\n";
        source1 += "Bob -> Alice : hello\n";
        source1 += "@enduml\n";

        DiagramSaver diagramSaver = new DiagramSaver(source1);
        diagramSaver.svg().attachDiagramToAllure("Example Diagrem");
    }

    /**
     * Добавление диаграммы в формате png не реализовано
     */
    @Disabled
    @Test
    void pngAttachmentsDiagramTest() {
        String source1 = "@startuml\n";
        source1 += "Bob -> Alice : hello\n";
        source1 += "@enduml\n";

        DiagramSaver diagramSaver = new DiagramSaver(source1);
        diagramSaver.svg().saveToFile(new File("mainSvg.svg"));
        diagramSaver.png().saveToFile(new File("mainPng.png"));
    }
}
